package com.friendsoft.crm.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author huyduong
 */
@Entity
@Table(name="crm_address")
@XmlAccessorType(XmlAccessType.FIELD)
public class Address extends BaseEntity {
	private static final long serialVersionUID = 1L;

	@Column(name="street")
	private String street ;

	@Column(name="po_box")
	private String poBox ;

	@Column(name="neighborhood")
	private String neightborhood ;

	@Column(name="city")
	private String city ;

	@Column(name="state_or_province")
	private String stateOrProvince ;

	@Column(name="zip_code")
	private String zipCode ;

	@Column(name="postal_code")
	private String postalCode ;

	@Column(name="country")
	private String country ;

	@XmlTransient
	@JoinColumn(name="contact_id" , nullable = false)
	private Contact contact ;

	/**
	 * default constructor
	 */
	public Address() {

	}

	/**
	 * @return the street
	 */
	public String getStreet() {
		return street;
	}

	/**
	 * @param street the street to set
	 */
	public void setStreet(String street) {
		this.street = street;
	}

	/**
	 * @return the poBox
	 */
	public String getPoBox() {
		return poBox;
	}

	/**
	 * @param poBox the poBox to set
	 */
	public void setPoBox(String poBox) {
		this.poBox = poBox;
	}

	/**
	 * @return the neightborhood
	 */
	public String getNeightborhood() {
		return neightborhood;
	}

	/**
	 * @param neightborhood the neightborhood to set
	 */
	public void setNeightborhood(String neightborhood) {
		this.neightborhood = neightborhood;
	}

	/**
	 * @return the city
	 */
	public String getCity() {
		return city;
	}

	/**
	 * @param city the city to set
	 */
	public void setCity(String city) {
		this.city = city;
	}

	/**
	 * @return the stateOrProvince
	 */
	public String getStateOrProvince() {
		return stateOrProvince;
	}

	/**
	 * @param stateOrProvince the stateOrProvince to set
	 */
	public void setStateOrProvince(String stateOrProvince) {
		this.stateOrProvince = stateOrProvince;
	}

	/**
	 * @return the zipCode
	 */
	public String getZipCode() {
		return zipCode;
	}

	/**
	 * @param zipCode the zipCode to set
	 */
	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}

	/**
	 * @return the postalCode
	 */
	public String getPostalCode() {
		return postalCode;
	}

	/**
	 * @param postalCode the postalCode to set
	 */
	public void setPostalCode(String postalCode) {
		this.postalCode = postalCode;
	}

	/**
	 * @return the country
	 */
	public String getCountry() {
		return country;
	}

	/**
	 * @param country the country to set
	 */
	public void setCountry(String country) {
		this.country = country;
	}

	/**
	 * @return the contact
	 */
	public Contact getContact() {
		return contact;
	}

	/**
	 * @param contact the contact to set
	 */
	public void setContact(Contact contact) {
		this.contact = contact;
	}
}
